/**
* ===============================================================================================================
* Native driver for lan911x Ethernet Controller.
*
* There has nothing depedency on Operating System or upper layer protocol stack.
* Yeah, it just a pure and clean driver. You can build the TCP/IP stack based on this driver.
* ===============================================================================================================
* Reference
*
* https://ww1.microchip.com/downloads/en/DeviceDoc/00002266B.pdf
* https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ApplicationNotes/ApplicationNotes/en562758.pdf
*
* ===============================================================================================================
* Copyright (c) 2024, DY Young.
* All rights reserved.
*
* Licencse Term
*----------------
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that
* the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
*    this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
*    following disclaimer in the documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* ===============================================================================================================
*/

#ifndef __LAN_911X_NATIVE_H__
#define __LAN_911X_NATIVE_H__

typedef unsigned int uint32;
#define useless(n) u##n
#define U32_FEILD_START(n) union union##n{uint32 val;struct {
#define U32_FEILD_STOP(n) } feild;};
#define U32_FEILD_STOP_AND_DEF(n) } feild;} n={0};
#define LOCAL_U32_FEILD(n) volatile union union##n n={0};

#endif //__LAN_911X_NATIVE_H__